package api

import (
	"github.com/gin-gonic/gin"
	"zk2zc/api/handler"
	"zk2zc/pkg"
)

func RouterLoad(r *gin.Engine) {
	r.POST("/user/register", handler.Register)
	r.POST("/user/login", handler.Login)

	user := r.Group("/user").Use(pkg.JWTAuth("2209a"))
	{
		user.GET("/list", handler.GetList)
		user.GET("/chat", handler.Chat)
	}
}
